\chapter{Simulations}
\section{Probe preparation}
For all the simulations, a realistic pinhole aperture as shown in \reffig{fig:pinhole} was used. Because the object is not mounted directly after the pinhole aperture in the experiment, the probe was propagated with a Fresnel transform
over a distance of \SI{7}{\milli\meter} as described in \refequ{equ:fresnel}. The distribution of the wavefield after propagation is shown in \reffig{fig:pinholefresnel}.

\begin{figure}[h!]
\centering
\subfigure[]{
\centering
 \includegraphics[scale=0.6]{./chapters/sim/pinhole.png}
  \label{fig:pinhole}
}
\subfigure[]{
\centering
 \includegraphics[scale=0.6]{./chapters/sim/pinhole_fresnel.png}
    \label{fig:pinholefresnel}
}
\caption[]{The probe before \subref{fig:pinhole}, and after \subref{fig:pinholefresnel} propagation over \SI{7}{\milli\meter}.}
\label{fig:pinholes}
\end{figure}

\section{Preparation of the simulated data}
After the probe is prepared, a number of illumination positions is generated. The centers of the illumination lie on concentric circles to prevent multiple possible solutions to the reconstruction (cite).
This would happen if the illuminations would lie on a rectangular grid. A set of generated positions is shown in \reffig{fig:objwithpos}.

\begin{algorithm}[tb]
   \caption{Data preparation}
   \label{alg:dataprep}
\begin{algorithmic}
   \STATE generate N position vectors $\{\vec{r}_i\}_{(i=1...N)}$, whose centers lie on concentric circles around the object center.
   \STATE generate N displacement vectors $\{\vec{\hat r}_i\}_{(i=1...N)} \sim (\mathcal{N}(0,\sigma^2),\mathcal{N}(0,\sigma^2))$ from a gaussian distribution with $\sigma^2$ standard deviation.
   \FOR{$j=1$ {\bfseries to} $N$}
   \STATE shift the probe by $\vec{\hat r}_j$
   \STATE $\tilde{\psi}_{j\vec{r}} = \mathcal{F}[P_{\vec{r}-\vec{r_j}}O_{\vec{r}}]$
   \STATE $I_{j\vec{q}}^{noisy} = \mathrm{Pois}(\abs{\tilde{\psi}_{j\vec{r}}}^2)$ with $\mathrm{Pois}(\lambda)$ the pixel wise sampling from a Poisson distribution with mean $\lambda$
   \ENDFOR
   \STATE save $\{I_{j\vec{q}}^{noisy}\}_{(j=1...N)}$ for later processing   
\end{algorithmic}
\end{algorithm}

An example of the generated probe positions is shown in \reffig{fig:objwithpos}. Examples of $\tilde{\psi}_{j\vec{r}}$ are shown in \reffig{fig:diffpatterns}.

\begin{figure}[h!]
 \centering
 \includegraphics{./chapters/sim/obj_with_positions.png}
 % obj_with_positions.png: 314x315 pixel, 72dpi, 11.08x11.11 cm, bb=0 0 314 315
 \caption{The biosample object with 232 generated illumination positions, whose centers are shown as black dots.}
 \label{fig:objwithpos}
\end{figure}

\begin{figure}[h!]
\centering
\subfigure[]{
\centering
 \includegraphics[scale=1]{./chapters/sim/probe_object_123.png}
  \label{fig:probe_object_1}
}
\subfigure[]{
\centering
 \includegraphics[scale=1]{./chapters/sim/probe_object_124.png}
    \label{fig:probe_object_2}
}
\subfigure[]{
\centering
 \includegraphics[scale=1]{./chapters/sim/probe_object_125.png}
    \label{fig:probe_object_3}
}
\caption[]{Three diffraction pattern as Fourier transform of the product of probe and object at different illumination positions for the eyedoctor sample.}
\label{fig:diffpatterns}
\end{figure}





